import { http } from "@/utils/http";

type ResultTable = {
  total?: number;
  data?: Array<any>;
};

//根据查询条件返回排查范围数据列表接口
export const scopequery = (data?: object) => {
  return http.request<ResultTable>("post", `/process/api/v1/check/scope/query`, {
    data
  });
};

//新增排查范围接口
export const scopecreate = (data?: object) => {
  return http.request<ResultTable>("post", `/process/api/v1/check/scope/create`, {
    data
  });
};

//删除排查范围接口
export const scopedelete = (data?: object) => {
  return http.request<ResultTable>("post", `/process/api/v1/check/scope/delete`, {
    data
  });
};

//根据主键ID查询排查范围详情接口
export const scopegetById = (data?: object) => {
  return http.request<ResultTable>("post", `/process/api/v1/check/scope/getById`, {
    data
  });
};

//更新排查范围接口
export const scopeupdate = (data?: object) => {
  return http.request<ResultTable>("post", `/process/api/v1/check/scope/update`, {
    data
  });
};

//查询排查地点信息
export const queryTree = (data?: object) => {
  return http.request<ResultTable>("post", `/digitaltwins/api/v1/position/queryTree`, {
    data
  });
};

//新增排查表（内容）接口
export const contentcreate = (data?: object) => {
  return http.request<ResultTable>("post", `/process/api/v1/check/content/create`, {
    data
  });
};

//删除排查表（内容）接口
export const contentdelete = (data?: object) => {
  return http.request<ResultTable>("post", `/process/api/v1/check/content/delete`, {
    data
  });
};

//根据主键ID查询排查表（内容）详情接口
export const contentgetById = (data?: object) => {
  return http.request<ResultTable>("post", `/process/api/v1/check/content/getById`, {
    data
  });
};

//根据查询条件返回排查表（内容）数据列表接口
export const contentquery = (data?: object) => {
  return http.request<ResultTable>("post", `/process/api/v1/check/content/query`, {
    data
  });
};

//更新排查表（内容）接口
export const contentupdate = (data?: object) => {
  return http.request<ResultTable>("post", `/process/api/v1/check/content/update`, {
    data
  });
};

//查询排查地点
export const positionqueryTree = (data?: object) => {
  return http.request<ResultTable>("post", `/digitaltwins/api/v1/position/queryTree`, {
    data
  });
};
